<!DOCTYPE HTML>
<html lang="en">
<head>
    <title>JQuery动画演示文档</title>
    <meta charset="UTF-8">
    <script src="./jquery/jquery-1.11.1.min.js">
    </script>
    <script>
        $(document).ready(function () {
            $("div").mouseenter(function () {
                $("div").animate({
                    center: '250px',
                    opacity: '0.1',
                    height: '250px',
                    width: '250px'
                }, 1000, () => {
                    alert('回调函数执行代码处...')
                });
            });
            $("div").mouseleave(function () {
                $("div").animate({
                    opacity: '1',
                    height: '100px',
                    width: '100px'
                }, 1000,() => {
                    alert('回调函数执行代码处!')
                });
            });
        });
    </script>
</head>
<body>
<div style="background:#98bf21;height:100px;width:100px;position:absolute;">
</div>
</body>
</html>
